<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>v-once的使用</title>
</head>

<body>
  <div id="root">
    <h2>{{message}}</h2>
    <!-- v-for后面接等号 -->
    <ul><li v-for="item in movies">{{item}}</li></ul>
    <!-- v-once后面没有接等号 -->
    <h2 v-once>{{message}}</h2>
  </div>
  <script src="../practice_project/js/vue.js"></script>
  <script>
    const app = new Vue({
      el: '#root',
      data: {
        message: 'Vue.js',
        movies:['A','B','C','D','E']
      }
    })
  </script>
</body>

</html>